<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
  <head>
   <link rel="stylesheet" type="text/css" href="style/bootstrap.min.css" />
   <script type="text/javascript" src="js/jquery.js"></script>
    
       <style type="text/css">
    	body{
	    	padding-top:70px;
	    	padding-left:70px;
	    	background-image:url(img/ab.png);
    	}
    	.prompt {
			margin-left: 20px;
			color: red;
		}
		input{
		height:20px;
		}
    </style>

  </head>
  
  <body class="body">
  	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">

				<a class="brand" href="#">凯盛项目管理系统</a>
				
			</div>
		</div>
	</div>
  	 	
  	 	<div class="container">
	  <div class="row">
		<div class="span9">
          
          	<div class="page-header">

          		<h2>项目列表</h2>
          	</div>
          	
          	<c:if test="${fn:length(projectList) == 0 && fn:length(UserprojectList) == 0}" >
  				<div style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
					你未参与任何项目  					
  				</div>
  			</c:if>

          	<a id="createproj" style="display:none" href="createproject.action" class="btn btn-success"><i class="icon-plus icon-white"></i>开始一个新项目</a>
			<a id="createproj" style="display:none" href="adduser.action" class="btn btn-success"><i class="icon-plus icon-white"></i>添加用户</a>
			<c:forEach items="${projectList}" var="project">
		    <ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
				<li class="active">
					<a href="proj.action?id=${project.id}"><i class="icon-th"></i>${project.projname}</a>

				</li>
			</ul>
			<div class="wall">
				<p>${project.projdesc}</p>
			</div>
			</c:forEach>
			
			<c:forEach items="${UserprojectList}" var="userproject">
		    <ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
				<li class="active">
					<a href="proj.action?id=${userproject.project.id}"><i class="icon-th"></i>${userproject.project.projname}</a>

				</li>
			</ul>
			<div class="wall">
				<p>${userproject.project.projdesc}</p>
			</div>
			</c:forEach>
			
  	 	</div>
  	 </div>
  </div>
  </body>
  <script type="text/javascript">
  	$(document).ready(function(){
  		if("admin"=="${user.username}"){
  			$(":hidden").show();
  		}
  	});
  </script>
</html>
